﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"   
  xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input">
    

    <!-- ******MAIN PAGE STYLES****** -->
    <!-- **************************** -->
    <!-- Primary Color Brushes -->
    <SolidColorBrush x:Key="BannerBackgroundColorBrush" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="ToolBarBackgroundColorBrush" Color="#FF326100"/>
    <SolidColorBrush x:Key="ToolBarForegroundColorBrush" Color="#FFFFFFFF"/> 
    <SolidColorBrush x:Key="ToolBarButtonHighLightColorBrush" Color="#FF326100"/>
        
    <SolidColorBrush x:Key="BodyTextColorBrush" Color="#FF313131"/>

    <!-- LayoutRoot Grid Style -->

   
    <Style x:Key="LayoutRootGridStyle" TargetType="Grid">        
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF49701E" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>                    
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="LayoutRootBorderStyle" TargetType="Border">
        <Setter Property="Background" Value="WhiteSmoke" />
        <Setter Property="CornerRadius" Value="5" />
        <Setter Property="BorderThickness" Value="1,1,1,4" />
        <Setter Property="Margin" Value="10" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Width" Value="980" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,0">
                    <GradientStop Color="#FF326100" Offset="0" />
                    <GradientStop Color="#FFDFDFDF" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- Content Border Style -->
    <Style x:Key="ContentBorderStyle" TargetType="Border">        
        <Setter Property="BorderBrush" Value="#FFFFFFFF"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0,122,0,0"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>       
    </Style>

    <!-- Content Border Style -->
    <Style x:Key="LoginBorderStyle" TargetType="Border">
        <Setter Property="BorderBrush" Value="#FFCCCCCC"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Width" Value="500"/>
        <Setter Property="Height" Value="290"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Background" Value="#FFEEEEEE"/>
    </Style>

    <Style x:Key="RegisterBorderStyle" TargetType="Border">
        <Setter Property="BorderBrush" Value="#FFCCCCCC"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Width" Value="500"/>
        <Setter Property="Height" Value="420"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Background" Value="#FFEEEEEE"/>
    </Style>

    <Style x:Key="PasswordChangeBorderStyle" TargetType="Border">
        <Setter Property="BorderBrush" Value="#FFCCCCCC"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Width" Value="500"/>
        <Setter Property="Height" Value="400"/>
        <Setter Property="CornerRadius" Value="5"/>
        <Setter Property="Background" Value="#FFEEEEEE"/>
    </Style>
    
    <!-- Content Frame Style -->
    <Style x:Key="ContentFrameStyle" TargetType="navigation:Frame">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <!-- Defines the animation for the content control, fade in and fade out -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="navigation:Frame">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="FadeIn" >
                                    <Storyboard >
                                        <DoubleAnimation Storyboard.TargetName="CPresenter" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5" AutoReverse="False"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <ContentPresenter x:Name="CPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Opacity="1"  />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>

        </Setter>
    </Style>

    <!-- Banner Style -->
    <Style x:Key="BannerGridStyle" TargetType="Grid">
        <Setter Property="Background" Value="{StaticResource BannerBackgroundColorBrush}"/>
        <Setter Property="Height" Value="80"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>        
    </Style>
    <Style x:Key="BannerBorderStyle" TargetType="Border">
                
        <Setter Property="BorderBrush" Value="#FF326100" />
        <Setter Property="BorderThickness" Value="0,0,0,1" />        
        <Setter Property="Padding" Value="0" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="CornerRadius" Value="15,15,0,0" />
        <Setter Property="Background">
            <Setter.Value>
                <RadialGradientBrush  Center="0.5,1" RadiusX="1" RadiusY="1" GradientOrigin="0.5,1">
                    <GradientStop Color="#FFC5E0A8" Offset="0" />
                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Navigation Grid Style -->
    <Style x:Key="ToolBarGridStyle" TargetType="Grid">
        <Setter Property="Background" Value="{StaticResource ToolBarBackgroundColorBrush}"/>
        <Setter Property="Height" Value="42"/>
        <Setter Property="Margin" Value="0,80,0,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>

    <!-- Login Grid Style -->
    <Style x:Key="LoginGridStyle" TargetType="Grid">                
        <Setter Property="Margin" Value="30,50,30,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>        
    </Style>

    <!-- Register Grid Style -->
    <Style x:Key="RegisterGridStyle" TargetType="Grid">
        <Setter Property="Margin" Value="30,50,30,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>

    <!-- Password Change Grid Style -->
    <Style x:Key="PasswordChangeGridStyle" TargetType="Grid">
        <Setter Property="Margin" Value="30,50,30,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>
    
    <!-- Branding Border Style -->
    <Style x:Key="BrandingBorderStyle" TargetType="Border">
        <Setter Property="Height" Value="75"/>
        <Setter Property="Margin" Value="5,0,0,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>        
    </Style>

    <!-- Branding StackPanel Style -->
    <Style x:Key="BrandingStackPanelStyle" TargetType="StackPanel">
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Orientation" Value="Horizontal"/>
    </Style>

    <!-- Logo Icon Style -->
    <Style x:Key="LogoIcon" TargetType="ContentControl">
        <Setter Property="Height" Value="70"/>
        <Setter Property="Width" Value="70"/>
        <Setter Property="Margin" Value="5,0,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Path Stroke="#FF999999" StrokeThickness="0.8" Data="M 35, 0 L 70, 70 L 0, 70 L 35, 0 M 35, 10 L 62, 65 L 8, 65 L 35, 10 M 35, 20 L 54, 60 L 16, 60 L 35, 20 "/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ApplicationName Style -->
    <Style x:Key="ApplicationNameStyle" TargetType="TextBlock">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Margin" Value="0,2,0,0"/>
        <Setter Property="VerticalAlignment" Value="Center"/>       
    </Style>
    
    <!-- Links StackPanel Style -->
    <Style x:Key="ToolBarStackPanelLeftStyle" TargetType="StackPanel">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Orientation" Value="Horizontal"/>
        <Setter Property="Margin" Value="15,0,15,0"/>
    </Style>

    <Style x:Key="ToolBarStackPanelRightStyle" TargetType="StackPanel">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="Orientation" Value="Horizontal"/>
        <Setter Property="Margin" Value="15,0,15,0"/>
    </Style>

    <!-- Link Style -->
    <Style x:Key="ToolBarLinkStyle" TargetType="HyperlinkButton">
        <Setter Property="Background" Value="{StaticResource ToolBarButtonHighLightColorBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>     
        <Setter Property="Foreground" Value="{StaticResource ToolBarForegroundColorBrush}"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="78"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="8,4,8,4"/>
    </Style>

    <Style x:Key="GeneralLinkStyleRight1" TargetType="HyperlinkButton">                
        <Setter Property="Foreground" Value="#FF3333CC"/>
        <Setter Property="Cursor" Value="Hand"/>        
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Right"/>
        <Setter Property="Margin" Value="5,0,0,0"/>
    </Style>

    <!-- Divider Style -->
    <Style x:Key="DividerStyle" TargetType="Rectangle">
        <Setter Property="Fill" Value="#1FFFFFFF"/>
        <Setter Property="Stroke" Value="Transparent"/>
        <Setter Property="Width" Value="1"/>
        <Setter Property="Margin" Value="2,4,2,4"/>
    </Style>


    <!-- ******CONTENT PAGE STYLES****** -->
    <!-- ******************************* -->


    <!-- Base Content Control -->
    <Style x:Key="BaseContentControlStyle" TargetType="ContentControl">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="top"/>
        <Setter Property="Margin" Value="0,122,0,0"/>
        
        <!-- Defines the animation for the content control, fade in and fade out -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>                        
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="FadeIn" >
                                    <Storyboard >
                                        <DoubleAnimation Storyboard.TargetName="CPresenter" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5" AutoReverse="False"/>
                                    </Storyboard>
                                </VisualState>                                
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <ContentPresenter x:Name="CPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Opacity="1"  />
                                                
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
       
        </Setter>           
       
    </Style>
    
    <!-- Page Style -->
    <Style x:Key="PageStyle" TargetType="navigation:Page"/>

    <!-- Page ScrollViewer Style -->
    <Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="FontSize" Value="12" />
    </Style>

    <!-- Content Panel Style -->
    <Style x:Key="ContentStackPanelStyle" TargetType="StackPanel">
        <Setter Property="Margin" Value="0,0,0,0"/>
    </Style>

    <!-- Header Text Style -->
    <Style x:Key="HeaderTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource BodyTextColorBrush}"/>
        <Setter Property="FontSize" Value="15"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="Margin" Value="0,0,0,4"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>

    <!-- Content Text Style -->
    <Style x:Key="ContentTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource BodyTextColorBrush}"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>

    <!-- Tab Style Style -->
    <Style x:Key="TabControlStyle" TargetType="controls:TabControl">
        <Setter Property="Padding" Value="20"/>
    </Style>

    <Style x:Key="TabItemStyle" TargetType="controls:TabItem">
        <Setter Property="Width" Value="100"/>
        <Setter Property="Height" Value="40"/>
    </Style>
    
    <!-- Button Styles -->
    <Style x:Key="GreenTickButtonStyle" TargetType="Button">               
       <Setter Property="ContentTemplate">        
            <Setter.Value>              
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">                       
                        <Image Source="/TheCollectiveNetwork;component/Assets/Images/greentick.png" Width="16" Height="16" Margin="10,0,0,0"/>
                        <ContentPresenter Content="{Binding}" Margin="10,0,0,0" />
                    </StackPanel>                
                </DataTemplate>            
            </Setter.Value>          
        </Setter>    
    </Style>

    <Style x:Key="RedCrossButtonStyle" TargetType="Button">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="/TheCollectiveNetwork;component/Assets/Images/redcross.png" Width="16" Height="16" Margin="10,0,0,0"/>
                        <ContentPresenter Content="{Binding}" Margin="10,0,0,0" />
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Error Window Style -->
    <Style x:Key="ErrorWindowStyle" TargetType="controls:ChildWindow">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="TabNavigation" Value="Cycle"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="BorderThickness" Value="1"/>       
    </Style>

    <!-- Default Child Window Style -->
    <Style x:Key="DefaultChildWindowStyle" TargetType="controls:ChildWindow">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="TabNavigation" Value="Cycle"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontSize" Value="12"/>
    </Style>

</ResourceDictionary>
